home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: The Month 2003 December / The Sunday Times - The Month 2003-12.iso / mac / The Month DEC 03 / engine / modules / music_thirds.swf / scripts / frame_1 / DoAction.as
Text File  |  2003-11-10  |  1KB  |  65 lines

  1. function addLink(mc)
  2. {
  3.    Links[mc.link] = mc;
  4. }
  5. function getMCfromLink(Item)
  6. {
  7.    if(Links[Item] == null)
  8.    {
  9.       var arr = [];
  10.       while(Item != sideMenu.ItemHome)
  11.       {
  12.          arr.unshift(Item._name.split("_").pop());
  13.          Item = Item._parent._parent;
  14.       }
  15.       var str = arr.join("/");
  16.       Links[Item] = Links[str];
  17.    }
  18.    return Links[Item];
  19. }
  20. function removeLinkListener()
  21. {
  22.    Tardis.sideMenu.EB.removeListener(this);
  23. }
  24. function init()
  25. {
  26.    gotoAndPlay(2);
  27. }
  28. function doOver(Item)
  29. {
  30.    var mc = eval("btn_" + Item);
  31.    mc.gotoAndStop("over");
  32. }
  33. function doOut(Item)
  34. {
  35.    var mc = eval("btn_" + Item);
  36.    mc.gotoAndStop("off");
  37. }
  38. function txtOver(num)
  39. {
  40.    var mc = eval("btn_" + num);
  41.    mc.gotoAndStop("over");
  42.    _parent.preview.doOver(num);
  43.    Tardis.sideMenu.doOver(num);
  44. }
  45. function txtOut(num)
  46. {
  47.    var mc = eval("btn_" + num);
  48.    mc.gotoAndStop("off");
  49.    _parent.preview.doOut(num);
  50.    Tardis.sideMenu.doOut(num);
  51. }
  52. function txtUp(num)
  53. {
  54.    Tardis.sideMenu.doUp(num);
  55. }
  56. Links = {};
  57. Tardis.sideMenu.EB.addListener(this);
  58. stop();
  59. onReady();
  60. this.onUnload = function()
  61. {
  62.    removeLinkListener();
  63.    this.onUnload = null;
  64. };
  65.